home *** CD-ROM | disk | FTP | other *** search
- LBN - A Line By Number listing utility for C programs
-
- System Requirements: IBM-PC ( possibly Z100 )
-
-
- LBN is a list utility which was designed to assist in locating curly-brace
- mis-matched in C programs and to flag the existence of unbalanced pairs of
- parentheses and single and double quotes. Line numbering assists in finding
- lines in error as indicated by error ouputs from most C compilers, while
- curly brace checking makes localization of mis-matches relatively simple.
- Curly brace underflow is most obvious as is the indication of a nesting
- level after what should logically be the termination of a function.
-
-
- The following is an example of
- the output produced by this utility:
-
- LINE DEPTH SOURCE STATEMENTS 01:06:21 PM 08 JAN 1984 SORT.C PAGE 1.0
-
-
- 58 sort( in, fname )
- 59 FILE *in;
- 60 char *fname;
- 61 {
- 62 _ int nlines;
- 63 _
- 64 _ if( (nlines=readlines(in)) > 0 ) {
- 65 __ sortlines( 0, nlines-1 );
- 66 __ printlines( stdout, nlines );
- 67 __ }
- 68 _ else if( nlines < 0 )
- 69 _ fprintf(stderr, "sort: file is too large: %s\n", fname );
- 70 _
- 71 _ } /* end sort */
- 72
-
- If errors conditions are detected any or all of the following warning
- messages are appended to the list output:
-
- lbn: *WARNING* Braces mismatch. [x] unmatched [{ | }].
- lbn: *WARNING* Braces depth went negative.
- lbn: *WARNING* Parenthesis mismatch. [x] unmatched [( | )].
- lbn: *WARNING* Parenthesis depth went negative.
- lbn: *WARNING* Single quote mismatch.
- lbn: *WARNING* Double quote mismatch.
-
-
- LBN is invoked using the following command line:
-
- lbn [ -c <char> ] fname.ext [ >fname.ext or device ]
-
- Examples:
- LBN
-
- this invokation elicits the following usage message:
-
- usage: lbn [ -c <char> ] fname.ext [ >fname.ext or device ]
- where: <char> is a user-specified
- profiling symbol ... the standard
- symbol is an underscore
-
- LBN sort.c
-
- this invokation would list sort.c to the console.
-
- LBN sort.c >LPT1:
-
- this invokation would list sort.c directly to the
- line printer device.
-
- LBN sort.c >sort.lbn
-
- this invokation would list sort.c to a disk file named
- 'sort.lbn'.
-
- LBN sort.c -c * >sort.lbn
-
- this invokation would change the profiling character from
- the standard underscore for an asterisk and list sort.c
- to a disk file name 'sort.lbn'.
-
-
- It should be noted that the I/O redirection currently supported by this
- utility is << NOT >> compatible with that supported by MSDOS 2.0.
-
- Page numbering, which has the format 'x.y', in the generated listing
- is influenced by two factors: embedded formfeed characters and the page
- line count. the primary page number ( x ) is incremented by embedded
- FF's while the secondary page count ( y ) is incremented each time LBN
- generates an internal page break. Note that embedded FF's are honored.
-
-